package example.data;

import java.util.LinkedList;

/**
 * Created by lenovo on 2016/11/7 0007.
 * listname.add() 和 listname.set() 方法来修改链接中的元素
 */
public class ModifyLink {
    public static void main(String[] a) {
        LinkedList<String> officers = new LinkedList<String>();
        officers.add("B");
        officers.add("B");
        officers.add("T");
        officers.add("H");
        officers.add("P");
        System.out.println(officers);
        officers.set(2, "M");
        System.out.println(officers);
    }
}
